(:
  A procedure to number all items in a Display file
  It suppresses any previous numbering
:)
declare boundary-space strip;
import module namespace
    jj = "http://kumquat.emse.fr/utilitaires"
    at "jjutils.xq" ;
<display type='fr.emse.tatiana.analysis'>{
let $t := $arguments[1]
let $d := doc($t)/display/item
for $item at $p in $d
return
  <item>{
    <info name="target-anchor">{$item/info[@name="src-anchor"]/anchor}</info>,
    <info name="comment">{xs:string($item/info[position()=last()])}</info>
  }</item>
}</display>
